﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Stack sat1 = new Stack();

            sat1.Push("老胡，你布置的作业太多了！");
            sat1.Push("胡小胖");
            sat1.Push(857);

            foreach (var v in sat1 )
            {
                Console.WriteLine(v);
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine();

            Stack sat2 = new Stack();

            sat2.Push("第一个苹果");
            sat2.Push("第二个苹果");
            sat2.Push("第三个苹果");
            Console.WriteLine("取出苹果：");

            while (sat2.Count   !=1)
            {
                Console.WriteLine(sat2.Pop());
            }


        }
    }
}
